package net.ifilm.utility;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * User: <a href="wangjunneil@gmail.com">wangjun</a>
 * Date: 2012-08-10 23:27
 */
public class DateTimeUtil {

    public static Date getCurrentDate() {
        return Calendar.getInstance().getTime();
    }

    public static String getDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        return sdf.format(new Date());
    }
    
    public static String parseDate(Date date) {
    	SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
    	return sdf.format(date);
    }

    public static String parseCreateTime(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        return sdf.format(date);
    }
}
